#coding=utf8

from socket import *

host = 'localhost'
port = 12345
BUF_SIZE = 1024
s_addr = (host,port)

client = socket(AF_INET,SOCK_DGRAM)

while True:
	data = raw_input('>>')
	if not data:
                print '空数据'
	client.sendto(data,s_addr)
	data,addr = client.recvfrom(BUF_SIZE)
	print(data)
	
client.close()
